import request from '@/utils/request'

// 查询数据字典列表
export function listDatadic(query) {
  return request({
    url: '/basic/datadic/list',
    method: 'get',
    params: query
  })
}

export function getlistDatadic(query) {
  return request({
    url: '/basic/datadic/getlist',
    method: 'get',
    params: query
  })
}

// 查询数据字典详细
export function getDatadic(id) {
  return request({
    url: '/basic/datadic/' + id,
    method: 'get'
  })
}

// 新增数据字典
export function addDatadic(data) {
  return request({
    url: '/basic/datadic',
    method: 'post',
    data: data
  })
}

// 修改数据字典
export function updateDatadic(data) {
  return request({
    url: '/basic/datadic',
    method: 'put',
    data: data
  })
}

// 删除数据字典
export function delDatadic(id) {
  return request({
    url: '/basic/datadic/' + id,
    method: 'delete'
  })
}

// 导出数据字典
export function exportDatadic(query) {
  return request({
    url: '/basic/datadic/export',
    method: 'get',
    params: query
  })
}